home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 4 / Amiga Tools 4.iso / tools / mail-tools / thor / thor_2.22 / installthor < prev    next >
Text File  |  1996-02-26  |  21KB  |  927 lines

  1. ;*************************************************************************
  2. ;    Title:
  3. ;        InstallThor
  4. ;*************************************************************************
  5. ;    Description:
  6. ;        Commodore Installer Script for the Thor 2.22 software
  7. ;*************************************************************************
  8. ;    Author:
  9. ;        Øyvind Ellefsen - versions for THOR upto 1.22
  10. ;       Petter Nilsen   - versions for 1.25 ->
  11. ;*************************************************************************
  12. ;    Still to do:
  13. ;        - Show .readme file
  14. ;        - Warn against MultiUser
  15. ;
  16. ;*************************************************************************
  17. ;
  18. ;******************************************************
  19. ;***** SET UP OUR VARIABLES AND OTHER SUCH STUFF ******
  20. ;******************************************************
  21.  
  22. ; some useful variables
  23.     (set true 1)
  24.     (set false 0)
  25.     (set yes true)
  26.     (set no false)
  27.     (set is_a_file 1)
  28.     (set is_a_dir 2)
  29.     (set quote "\"")
  30.     (set newline "\n")
  31.     (set nothing "")
  32.     (set bbspack 0)
  33.     (set inetpack 0)
  34.  
  35. ; set up our delete options
  36.     (delopts "AskUser" "OkNoDelete" "Force")
  37.  
  38. ; some useful procedures
  39.     ; change userlevel to expert
  40.     (procedure expert_level
  41.         (
  42.             (user 2)
  43.         )
  44.     )
  45.  
  46. ; reset userlevel back to default
  47.     (procedure default_level
  48.         (
  49.             (user default-level)
  50.         )
  51.     )
  52.  
  53. ; store off userlevel
  54.     (procedure save_default_level
  55.         (
  56.             (set default-level @user-level)
  57.         )
  58.     )
  59.  
  60. ; some overused strings
  61. (set omp (cat "One moment please..." newline))
  62.  
  63. ; introduce ourselfs to the viewers
  64. (welcome "Welcome to the Thor installer.  This installer uses "
  65.     "the Commodore Amiga Installer.  All of our future Thor releases "
  66.     "will be using this installer and we would like to get any feedback "
  67.     "that might help to improve the installation procedure." newline
  68. )
  69. ; first reset the user level so that the novice can see whats going on
  70.     (save_default_level)
  71.     (expert_level)
  72.  
  73. ;Make assign to install from
  74.     (makeassign "Thor_Install" "" (safe))
  75.  
  76.  
  77. ;******************
  78. ;** Check Memory **
  79. ;******************
  80.  
  81. (run "Avail flush")
  82.  
  83. (set Running (run "Thor_Install:CheckForLib"))
  84.  
  85. (while (= Running 20)
  86.       (
  87.         (Message newline "Thor seem to be running, you MUST close it NOW."    
  88.                 newline "If you don't, the installation will fail!")
  89.         (run "Avail flush")
  90.         (set Running (run "Thor_Install:CheckForLib"))
  91.     )
  92. )
  93.  
  94. ;************************
  95. ;** Start Installation **
  96. ;************************
  97.  
  98. (if (exists "Thor:libs/bbsread.library" (noreq))
  99. ; Then
  100.     ((set end_text "Please use the UpdateThor script to\nupdate your already installed THOR.")
  101.     (abort end_text))
  102. )
  103.  
  104. (if (exists "BBSData:global.config" (noreq))
  105. ; Then
  106.     ((set end_text "Please use the UpdateThor script to\nupdate your already installed THOR.")
  107.     (abort end_text))
  108. )
  109.  
  110. (if (exists "envarc:THOR/BBSDataPath" (noreq))
  111.     (
  112.         (if    (askbool
  113.                    (prompt 
  114.                         "THOR seems to be already installed, "
  115.                         "do you want to install it again from scratch?")
  116.                 (help 
  117.                         "The installer script has found a previous "
  118.                         "installation of THOR.\n\n"
  119.                         "Select YES if you want it install again, otherwise NO")
  120.                 (default 1)
  121.             )
  122.             ; Then
  123.             (
  124.                 (run "delete envarc:thor all force")
  125.                 (run "delete env:thor all force")
  126.             )
  127.             ; Else
  128.             (
  129.                 (set end_text "Please use the UpdateThor script to\nupdate your already installed THOR.")
  130.                 (abort end_text)
  131.             )
  132.         )
  133.     )
  134. )
  135.  
  136. (set Thor_Dir 
  137.     (askdir
  138.         (prompt "Where would you like Thor installed?"
  139.         newline "The installer will NOT create a directory!")
  140.         (help @askdir-help)
  141.         (default "Work:")
  142.         (newpath)
  143.     )
  144. )
  145. (set Thor_Dir (expandpath Thor_Dir))
  146.  
  147. ; before we go on lets reset the user's level back to what it was
  148. (default_level)
  149.  
  150. ; verify that the Thor directory exists
  151. (if (<> (exists Thor_Dir) is_a_dir)
  152.     (
  153.         (makedir Thor_Dir
  154.             (prompt
  155.                 "The directory you have selected for Thor does not "
  156.                 "seem to exist.  Do you want us to create it for you?"
  157.             )
  158.             (help @makedir-help)
  159.             (infos)
  160.             (confirm)
  161.         )
  162.     )
  163. )
  164.  
  165. ; Create directories for the THOR installation
  166.  
  167. (makeassign "Thor" Thor_dir)
  168. (makedir "Thor:Data")
  169. (makeassign "BBSData" "Thor:data")
  170.  
  171. ;***********************************
  172. ;***** GET FIRST DISK IN HERE ******
  173. ;***********************************
  174.  
  175. ; first copy over the stuff
  176. (working omp "Decompressing and copying Thor files.")
  177.  
  178. (run "Thor_Install:lha -a x Thor_Install:thor.lha THOR:" )
  179.  
  180. ;************************
  181. ;**  Copy the keyfile  **
  182. ;************************
  183. (if (exists "Thor_Install:THOR.key" (noreq))
  184. ; Then
  185.     (copyfiles
  186.         (source "Thor_Install:THOR.key")
  187.         (dest "THOR:")
  188.         (nogauge)
  189.     )
  190. )
  191.         
  192. ;*****************************************
  193. ;**  Copy the default arexx macro file  **
  194. ;*****************************************
  195. (if (exists "Thor_Install:THOR.macros" (noreq))
  196. ; Then
  197.     (copyfiles
  198.         (source "Thor_Install:THOR.macros")
  199.         (dest "THOR:")
  200.         (nogauge)
  201.     )
  202. )
  203.  
  204. (default_level)
  205.         
  206. ;***********************************
  207. ; Create the environment variables *
  208. ;***********************************
  209.  
  210. (set Running (run "Thor:bin/basemanager convert >con:0/0/640/200/Converting/AUTO/CLOSE/WAIT"))
  211. (if (<> 0 Running)
  212. (
  213.     ((set end_text "Basemanager failed in setting up the env-variables.")
  214.     (abort end_text)))
  215. )
  216.  
  217. ;******************
  218. ;** Locale stuff **
  219. ;******************
  220.  
  221. (default_level)
  222.  
  223. (set catalog
  224.    (askoptions
  225.       (prompt "What languages would you like to install ?\n"
  226.             "English is the built-in language.")
  227.       (help
  228.             "This will install locale files for other languages than English. "
  229.             "You can set the prefered language on Workbench and in Thor by"
  230.             "using the prefs:locale tool." newline @askchoice-help
  231.       )
  232.       (choices "Norsk" "Dansk" "Svenska" "Deutsch")
  233.       (default 0)
  234.    )
  235. )
  236.  
  237. (makedir "thor:catalogs")
  238.  
  239. (if (bitand 1 catalog)
  240.     (copyfiles
  241.         (source "Thor_Install:catalogs/norsk")
  242.         (dest "thor:catalogs/norsk")
  243.         (all)
  244.     )
  245. )
  246.  
  247. (if (bitand 2 catalog)
  248.     (copyfiles
  249.         (source "Thor_Install:catalogs/dansk")
  250.         (dest "thor:catalogs/dansk")
  251.         (all)
  252.     )
  253. )
  254.  
  255. (if (bitand 4 catalog)
  256.     (copyfiles
  257.         (source "Thor_Install:catalogs/svenska")
  258.         (dest "thor:catalogs/svenska")
  259.         (all)
  260.     )
  261. )
  262.  
  263. (if (bitand 8 catalog)
  264.     (copyfiles
  265.         (source "Thor_Install:catalogs/deutsch")
  266.         (dest "thor:catalogs/deutsch")
  267.         (all)
  268.     )
  269. )
  270.  
  271. ;*********************
  272. ;** reqtools.libary **
  273. ;*********************
  274.  
  275. (copylib
  276.     (prompt "Copying ReqTools library")
  277.     (help "This will copy the ReqTools library." newline @copylib-help)
  278.     (source "Thor_Install:reqtools.library")
  279.     (dest "libs:")
  280. )
  281.  
  282. ;***********
  283. ;** Fonts **
  284. ;***********
  285.     
  286. (copyfiles
  287.     (prompt "Choose the fonts to install with Thor" newline "These are not required for Thor to run" )
  288.     (help "This will copy the default font files for Thor." newline @copyfiles-help)
  289.     (source "Thor_Install:Fonts")
  290.     (dest "Fonts:")
  291.     (fonts)
  292.     (choices "Grn" "Thin609" "Thin611" "Thin711")
  293.     (confirm)
  294. )
  295.  
  296. ;**************************************
  297. ;* Install the bbsread database stuff *
  298. ;**************************************
  299.  
  300. (set failed (run "thor:bin/initarc"))
  301. (if (<> 0 failed)
  302.     (
  303.         ((set end_text "Installation failed.\nIf you received any error message,\nplease write this down and send us\na mail about the problem.")
  304.         (abort end_text))
  305.     )
  306. )
  307.  
  308. (run "thor:bin/InitCharsets")
  309.  
  310. (if (exists "Thor_Install:bin/parseqwk" (noreq))
  311.     ; Then
  312.     (
  313.         (set bbspack 1)
  314.     )
  315.     ; Else
  316.     (
  317.         (if    (askbool
  318.                 (prompt newline 
  319.                                 "Would you like to install the modules for "
  320.                                 "QWK, Fido, Hippo, Bluewave, ABBS/MBBS and Omen "
  321.                                 "to be used with Bulletin Board Systems?\n\n "
  322.                                 "(you will be able to select which modules to "
  323.                                 "install later in this installtions procedure).")
  324.                 (help newline
  325.                                 "This section of the installation is dedicated "
  326.                                 "to installation of some common formats "
  327.                                 "required if you want to use THOR with BBSes.\n\n"
  328.                                 "Select YES if you want to continue with this "
  329.                                 "installation, otherwise NO")
  330.                 (default 1)
  331.             )
  332.             ; Then 
  333.             (
  334.                 (set bbsfile 
  335.                     (askfile
  336.                         (prompt 
  337.                                 "Please select the BBS archive for THOR 2.2. "
  338.                                 "(Usually named 'thor22_bbs.lha').\n\n"
  339.                                 "It will be unarchived automatically.")
  340.                         (help @askfile-help)
  341.                         (default "sys:")
  342.                     )
  343.                 )
  344.                 ; verify that the file exists
  345.                 (if (exists bbsfile)
  346.                     (
  347.                         (set runfile (cat runfile "Thor_Install:lha -a x " quote bbsfile quote " Thor_Install:"))
  348.                         (set failed (run runfile))
  349.                         (if (<> 0 failed)
  350.                         (
  351.                             ((set failed_text "Unarchiving of the BBS archive failed.")
  352.                             (message end_text)))
  353.                         )
  354.                         ; Else
  355.                         (
  356.                             (set bbspack 1)
  357.                         )
  358.                     )
  359.                 )
  360.             )
  361.         )
  362.     )
  363. )
  364.  
  365. (if (exists "Thor_Install:bin/gettcp" (noreq))
  366.     ; Then
  367.     (
  368.         (set inetpack 1)
  369.     )
  370.     ; Else
  371.     (
  372.         (if    (askbool
  373.                 (prompt newline 
  374.                                 "Would you like to install the modules for "
  375.                                 "UUCP, SOUP, NNTP, SMTP and POP3 "
  376.                                 "to be used with Internet?\n\n"
  377.                                 "(you will be able to select which modules to "
  378.                                 "install later in this installtions procedure).")
  379.                 (help newline
  380.                                 "This section of the installation is dedicated "
  381.                                 "to installation of some common formats "
  382.                                 "required if you want to use THOR with Internet.\n\n"
  383.                                 "Select YES if you want to continue with this "
  384.                                 "installation, otherwise NO")
  385.                 (default 1)
  386.             )
  387.             ; Then 
  388.             (
  389.                 (set inetfile 
  390.                         (askfile
  391.                             (prompt 
  392.                                     "Please select the Internet archive for THOR 2.2\n"
  393.                                     "(Usually named 'thor22_inet.lha').\n\n"
  394.                                     "It will be unarchived automatically."
  395.                             (help @askfile-help)
  396.                             (default "sys:")
  397.                         )
  398.                     )
  399.                 )
  400.                 ; verify that the file exists
  401.                 (if (exists inetfile)
  402.                     (
  403.                         (set runfile2 (cat runfile2 "Thor_Install:lha -a x " quote inetfile quote " Thor_Install:"))
  404.                         (set failed (run runfile2))
  405.                         (if (<> 0 failed)
  406.                         (
  407.                             ((set failed_text "Unarchiving of the Internet archive failed.")
  408.                             (message end_text)))
  409.                         )
  410.                         ; Else
  411.                         (
  412.                             (set inetpack 1)
  413.                         )
  414.                     )
  415.                 )
  416.             )
  417.         )
  418.     )
  419. )
  420.  
  421. (if (= bbspack 1)
  422.     (
  423.         (set bbs_type
  424.            (askoptions
  425.               (prompt
  426.                         "Please select which BBS modules "
  427.                         "you want to install.")
  428.               (help
  429.                     "What system type for BBS usage that should be "
  430.                     "installed can be selected here."
  431.               )
  432.  
  433.               (choices
  434.                     "QWK        - Normal QWK"
  435.                     "Fido       - Normal Fidonet"
  436.                     "BlueWave   - Normal BlueWave"
  437.                     "ABBS       - Normal ABBS"
  438.                     "ABBS_QWK   - ABBS with QWK support"
  439.                     "MBBS       - Normal MBBS"
  440.                     "Hippo/BBBS - Normal Hippo V2 and Hippo on BBBS"
  441.                     "Omen       - Normal Omen"
  442.               )
  443.               (default -1)
  444.            )
  445.         )
  446.         (copyfiles
  447.             (source "Thor_Install:scripts")
  448.             (dest "THOR:scripts")
  449.             (pattern "#?BBS#?")
  450.         )
  451.         (if (bitand 1 bbs_type)
  452.             (
  453.                 (copyfiles
  454.                     (source "Thor_Install:bin")
  455.                     (dest "THOR:bin")
  456.                     (pattern "#?QWK")
  457.                 )
  458.                 (copyfiles
  459.                     (source "Thor_Install:s/cfgqwk")
  460.                     (dest "THOR:s")
  461.                 )
  462.                 (execute "thor:s/cfgqwk")
  463.             )
  464.         )
  465.         (if (bitand 2 bbs_type)
  466.             (
  467.                 (copyfiles
  468.                     (source "Thor_Install:bin")
  469.                     (dest "THOR:bin")
  470.                     (pattern "#?FIDO")
  471.                 )
  472.                 (copyfiles
  473.                     (source "Thor_Install:s/cfgfido")
  474.                     (dest "THOR:s")
  475.                 )
  476.                 (execute "thor:s/cfgfido")
  477.             )
  478.         )
  479.         (if (bitand 4 bbs_type)
  480.             (
  481.                 (copyfiles
  482.                     (source "Thor_Install:bin")
  483.                     (dest "THOR:bin")
  484.                     (pattern "#?BLUE")
  485.                 )
  486.                 (copyfiles
  487.                     (source "Thor_Install:s/cfgblue")
  488.                     (dest "THOR:s")
  489.                 )
  490.                 (execute "thor:s/cfgblue")
  491.             )
  492.         )
  493.         (if (bitand 8 bbs_type)
  494.             (
  495.                 (copyfiles
  496.                     (source "Thor_Install:bin/packambbs")
  497.                     (dest "THOR:bin")
  498.                 )
  499.                 (copyfiles
  500.                     (source "Thor_Install:bin/parsemsg")
  501.                     (dest "THOR:bin")
  502.                 )
  503.                 (copyfiles
  504.                     (source "Thor_Install:s/cfgabbs")
  505.                     (dest "THOR:s")
  506.                 )
  507.                 (execute "thor:s/cfgabbs")
  508.             )
  509.         )
  510.         (if (bitand 16 bbs_type)
  511.             (
  512.                 (copyfiles
  513.                     (source "Thor_Install:bin")
  514.                     (dest "THOR:bin")
  515.                     (pattern "#?QWK")
  516.                 )
  517.                 (copyfiles
  518.                     (source "Thor_Install:s/cfgabbs_qwk")
  519.                     (dest "THOR:s")
  520.                 )
  521.                 (execute "thor:s/cfgabbs_qwk")
  522.             )
  523.         )
  524.         (if (bitand 32 bbs_type)
  525.             (
  526.                 (copyfiles
  527.                     (source "Thor_Install:bin/packambbs")
  528.                     (dest "THOR:bin")
  529.                 )
  530.                 (copyfiles
  531.                     (source "Thor_Install:bin/parsemsg")
  532.                     (dest "THOR:bin")
  533.                 )
  534.                 (copyfiles
  535.                     (source "Thor_Install:s/cfgmbbs")
  536.                     (dest "THOR:s")
  537.                 )
  538.                 (execute "thor:s/cfgmbbs")
  539.             )
  540.         )
  541.         (if (bitand 64 bbs_type)
  542.             (
  543.                 (copyfiles
  544.                     (source "Thor_Install:bin")
  545.                     (dest "THOR:bin")
  546.                     (pattern "#?hippo")
  547.                 )
  548.                 (copyfiles
  549.                     (source "Thor_Install:s/cfghippo")
  550.                     (dest "THOR:s")
  551.                 )
  552.                 (copyfiles
  553.                     (source "Thor_Install:s/cfgbbbs")
  554.                     (dest "THOR:s")
  555.                 )
  556.                 (execute "thor:s/cfghippo")
  557.                 (execute "thor:s/cfgbbbs")
  558.             )
  559.         )
  560.         (if (bitand 128 bbs_type)
  561.             (
  562.                 (copyfiles
  563.                     (source "Thor_Install:bin")
  564.                     (dest "THOR:bin")
  565.                     (pattern "#?omen")
  566.                 )
  567.                 (copyfiles
  568.                     (source "Thor_Install:s/cfgomen")
  569.                     (dest "THOR:s")
  570.                 )
  571.                 (execute "thor:s/cfgomen")
  572.             )
  573.         )
  574.     )
  575. )
  576.  
  577. (if (= inetpack 1)
  578.     (
  579.         (set bbs_type
  580.            (askoptions
  581.               (prompt
  582.                         "Please select which Internet modules "
  583.                         "you want to install.")
  584.               (help
  585.                     "What system type for Internet usage that should be "
  586.                     "installed can be selected here."
  587.               )
  588.  
  589.               (choices
  590.                         "TCP/TCP_ONLINE - POP3, SMTP and NNTP"
  591.                         "SOUP/UQWK_SOUP - Normal SOUP and SOUP w/uqwk"
  592.                         "UUCP           - Normal UUCP"
  593.               )
  594.               (default -1)
  595.            )
  596.         )
  597.  
  598.         (copyfiles
  599.             (source "Thor_Install:libs/utnet.library")
  600.             (dest "THOR:libs")
  601.         )
  602.  
  603.         (copyfiles
  604.             (source "Thor_Install:bin/InitRFC")
  605.             (dest "THOR:bin")
  606.         )
  607.  
  608.         (copyfiles
  609.             (source "Thor_Install:scripts")
  610.             (dest "THOR:scripts")
  611.             (pattern "#?UQWK#?")
  612.         )
  613.  
  614.         (if (bitand 1 bbs_type)
  615.             (
  616.                 (copyfiles
  617.                     (source "Thor_Install:bin")
  618.                     (dest "THOR:bin")
  619.                     (pattern "#?TCP")
  620.                 )
  621.                 (copyfiles
  622.                     (source "Thor_Install:")
  623.                     (dest "THOR:")
  624.                     (pattern "ConnectTHOR#?")
  625.                 )
  626.                 (copyfiles
  627.                     (source "Thor_Install:s/cfgtcp")
  628.                     (dest "THOR:s")
  629.                 )
  630.                 (copyfiles
  631.                     (source "Thor_Install:s/cfgtcp_online")
  632.                     (dest "THOR:s")
  633.                 )
  634.                 (execute "thor:s/cfgtcp")
  635.                 (execute "thor:s/cfgtcp_online")
  636.             )
  637.         )
  638.         (if (bitand 2 bbs_type)
  639.             (
  640.                 (copyfiles
  641.                     (source "Thor_Install:bin")
  642.                     (dest "THOR:bin")
  643.                     (pattern "#?SOUP")
  644.                 )
  645.                 (copyfiles
  646.                     (source "Thor_Install:s")
  647.                     (dest "THOR:s")
  648.                     (pattern "#?soup")
  649.                 )
  650.                 (makedir "THOR:unix")
  651.                 (copyfiles
  652.                     (source "Thor_Install:unix")
  653.                     (dest "THOR:unix")
  654.                     (all)
  655.                 )
  656.                 (execute "thor:s/cfguqwk_soup")
  657.                 (execute "thor:s/cfgsoup")
  658.             )
  659.         )
  660.         (if (bitand 4 bbs_type)
  661.             (
  662.                 (copyfiles
  663.                     (source "Thor_Install:bin")
  664.                     (dest "THOR:bin")
  665.                     (pattern "#?UUCP")
  666.                 )
  667.                 (copyfiles
  668.                     (source "Thor_Install:s/cfguucp")
  669.                     (dest "THOR:s")
  670.                 )
  671.                 (execute "thor:s/cfguucp")
  672.             )
  673.         )
  674.     )
  675. )
  676.  
  677. ;*****************************
  678. ;* Simple configuration here *
  679. ;*****************************
  680.  
  681. (if    (askbool
  682.     (
  683.         (prompt newline "The following section in this installation "
  684.                         "is used for setting up a download and an upload "
  685.                         "directory for message packets.  This section is "
  686.                         "optional, but the directories needs to be "
  687.                         "set in THOR if you do not set them up here.\n\n"
  688.                         "Do you want to proceed with this?")
  689.         (help newline "This section of the installation is dedicated "
  690.                         "to some first-time parameters that THOR "
  691.                         "needs to have configured.\n\n"
  692.                         "Select YES if you want to continue with this "
  693.                         "configuration, otherwise NO")
  694.         (default 1)
  695.         )
  696.     )
  697.     ; Then 
  698.     (
  699.         (set DL_Dir 
  700.                 (askdir
  701.                     (prompt "Where do you keep your downloaded message packets?\n\n"
  702.                             "This is usually the download directory "
  703.                             "configured in the communication program you "
  704.                             "use."
  705.                     (help @askdir-help)
  706.                     (default "Work:")
  707.                     (newpath)
  708.                 )
  709.             )
  710.         )
  711.         (set DL_Dir (expandpath DL_Dir))
  712.         
  713.         ; verify that the download directory exists
  714.         (if (<> (exists DL_Dir) is_a_dir)
  715.             (
  716.                 (makedir DL_Dir
  717.                     (prompt
  718.                         "The directory you have selected for downloaded "
  719.                         "message packets does not seem to exist.\n\n"
  720.                         "Do you want it to be created for you?")
  721.                     (help @makedir-help)
  722.                     (infos)
  723.                     (confirm)
  724.                 )
  725.             )
  726.         )
  727.         (if (= (exists DL_Dir) is_a_dir)
  728.             (
  729.                 (set dlstr (cat dlstr "sys:rexxc/rx THOR:rexx/cfgglobal.br DNL " quote DL_Dir quote))
  730.                 (run dlstr)
  731.                 (run dlstr)
  732.             )
  733.         )
  734.  
  735.         (set UL_Dir 
  736.                 (askdir
  737.                     (prompt "Where would you like to keep any reply "
  738.                             "message packets that THOR generates?\n\n"
  739.                             "This is usually the upload directory "
  740.                             "configured in your communication program."
  741.                     (help @askdir-help)
  742.                     (default "Work:")
  743.                     (newpath)
  744.                 )
  745.             )
  746.         )
  747.         (set UL_Dir (expandpath UL_Dir))
  748.         
  749.         ; verify that the download directory exists
  750.         (if (<> (exists UL_Dir) is_a_dir)
  751.             (
  752.                 (makedir UL_Dir
  753.                     (prompt
  754.                         "The directory you have selected for upload of "
  755.                         "reply packets does not seem to exist.\n\n"
  756.                         "Do you want it to be created for you?")
  757.                     (help @makedir-help)
  758.                     (infos)
  759.                     (confirm)
  760.                 )
  761.             )
  762.         )
  763.         (if (= (exists UL_Dir) is_a_dir)
  764.             (
  765.                 (set ulstr (cat ulstr "sys:rexxc/rx THOR:rexx/cfgglobal.br UPL " quote UL_Dir quote))
  766.                 (run ulstr)
  767.             )
  768.         )
  769.     )
  770. )
  771.  
  772. ;*****************************
  773. ;****** Install icons ********
  774. ;*****************************
  775.  
  776. (set icon
  777.     (askchoice
  778.         (prompt
  779.             "Please select what icon-set to install with THOR.\n")
  780.         (help
  781.             "If you use MagicWB on your Workbench, "
  782.             "you might want to install the special MagicWB icons.\n\n"
  783.             "Likewise, if you use NewIcons on your Workbench, "
  784.             "you might want to install the special NewIcons icons.")
  785.         (choices "Normal icons" "MagicWB icons" "NewIcons icons")
  786.         (default 0)
  787.     )
  788. )
  789.  
  790. (if (= icon 1)
  791.     (
  792.         (copyfiles
  793.             (prompt "Copying MagicWB icon files")
  794.             (source "Thor_Install:MWBIcons")
  795.             (dest "Thor:")
  796.             (pattern "~(THOR.guide.info)")
  797.             (nogauge)
  798.         )
  799.         (copyfiles
  800.             (prompt "Copying MagicWB icon files")
  801.             (source "Thor_Install:MWBIcons/THOR.guide.info")
  802.             (dest "Thor:Docs")
  803.             (newname "THOR.guide.info")
  804.             (nogauge)
  805.         )
  806.         (copyfiles
  807.             (prompt "Copying MagicWB icon files")
  808.             (source "Thor_Install:MWBIcons/THOR.guide.info")
  809.             (dest "Thor:Docs")
  810.             (newname "ConfigTHOR.guide.info")
  811.             (nogauge)
  812.         )
  813.         (copyfiles
  814.             (prompt "Copying MagicWB icon files")
  815.             (source "Thor_Install:MWBIcons/THOR.guide.info")
  816.             (dest "Thor:Docs")
  817.             (newname "ARexx.guide.info")
  818.             (nogauge)
  819.         )
  820.         (copyfiles
  821.             (prompt "Copying MagicWB icon files")
  822.             (source "Thor_Install:MWBIcons/THOR.guide.info")
  823.             (dest "Thor:Docs")
  824.             (newname "BBSReadRexx.guide.info")
  825.             (nogauge)
  826.         )
  827.         (copyfiles
  828.             (prompt "Copying MagicWB icon files")
  829.             (source "Thor_Install:MWBIcons/THOR.guide.info")
  830.             (dest "Thor:Docs")
  831.             (newname "THOR_Rexx.guide.info")
  832.             (nogauge)
  833.         )
  834.         (copyfiles
  835.             (prompt "Copying MagicWB icon files")
  836.             (source "Thor_Install:MWBIcons/THOR.guide.info")
  837.             (dest "Thor:Docs")
  838.             (newname "Installation.guide.info")
  839.             (nogauge)
  840.         )
  841.     )
  842. )
  843. (if (= icon 2)
  844.     (
  845.         (copyfiles
  846.             (prompt "Copying NewIcons icon files")
  847.             (source "Thor_Install:NewIcons")
  848.             (dest "Thor:")
  849.             (pattern "~(THOR.guide.info)")
  850.             (nogauge)
  851.         )
  852.         (copyfiles
  853.             (prompt "Copying NewIcons icon files")
  854.             (source "Thor_Install:NewIcons/THOR.guide.info")
  855.             (dest "Thor:Docs")
  856.             (newname "THOR.guide.info")
  857.             (nogauge)
  858.         )
  859.         (copyfiles
  860.             (prompt "Copying NewIcons icon files")
  861.             (source "Thor_Install:NewIcons/THOR.guide.info")
  862.             (dest "Thor:Docs")
  863.             (newname "ConfigTHOR.guide.info")
  864.             (nogauge)
  865.         )
  866.         (copyfiles
  867.             (prompt "Copying NewIcons icon files")
  868.             (source "Thor_Install:NewIcons/THOR.guide.info")
  869.             (dest "Thor:Docs")
  870.             (newname "ARexx.guide.info")
  871.             (nogauge)
  872.         )
  873.         (copyfiles
  874.             (prompt "Copying NewIcons icon files")
  875.             (source "Thor_Install:NewIcons/THOR.guide.info")
  876.             (dest "Thor:Docs")
  877.             (newname "BBSReadRexx.guide.info")
  878.             (nogauge)
  879.         )
  880.         (copyfiles
  881.             (prompt "Copying NewIcons icon files")
  882.             (source "Thor_Install:NewIcons/THOR.guide.info")
  883.             (dest "Thor:Docs")
  884.             (newname "THOR_Rexx.guide.info")
  885.             (nogauge)
  886.         )
  887.         (copyfiles
  888.             (prompt "Copying NewIcons icon files")
  889.             (source "Thor_Install:NewIcons/THOR.guide.info")
  890.             (dest "Thor:Docs")
  891.             (newname "Installation.guide.info")
  892.             (nogauge)
  893.         )
  894.     )
  895. )
  896.  
  897. (if (exists "env:sys/def_drawer.info" (noreq))
  898.     (copyfiles
  899.         (prompt "Copying default drawer icon")
  900.         (help "This will copy the default drawer icon." newline @copyfiles-help)
  901.         (source "env:sys/def_drawer.info")
  902.         (dest "Thor:")
  903.         (newname "Docs.info")
  904.         (infos)
  905.     )
  906. )
  907.  
  908.  
  909. ;*****************************
  910. ;***** WE ARE ALMOST DONE ****
  911. ;*****************************
  912.  
  913. ; make sure that default-dir is pointing to the right place
  914. (set @default-dest Thor_Dir)
  915.     
  916. (makeassign "Thor_Install")     
  917. (makeassign "BBSData")
  918. (makeassign "Thor_Disk" (safe))
  919.  
  920. ; final message for our viewers
  921.     (set end_text (cat "Hope you like THOR! Don't hesitate to "
  922.                     "send us comments, bugreports and suggestions."))
  923.  
  924. ; now for the exit
  925.     (exit end_text)
  926.  
  927.